An application program may want to generate user interface output for communicating with a user. The user interface output may include animation, audio, and textual elements. In addition, typically, the user interface output includes a combination of these elements. One example of user interface output is animation. In particular, animation is simulation of movement produced by displaying a series of successive frames on a display screen. The series of successive frames is called an animation sequence. Each frame contains all animation elements that make up a particular instance in the animation sequence. For example, an animation sequence may include a series of successive frames which result in displaying an animated bird flying. A particular frame may be one in which the bird is in the air. The frame may contain animation elements, such as a picture of the animated bird with its wines outstretched, trees in the background, and clouds in the air.
In addition, a user interface output state includes a set of conditions which defines aspects of that state. The conditions relate to animation, audio, and textual elements of the user interface output state. A user interface output state is captured by the set of values of the conditions. A user interface output sequence contains one or more user interface output states. Upon receiving an action to perform, the user interface output sequence may transition from a first user interface output state to a second user interface output state.
In particular, a first user interface output state may be captured by the set of values of a first set of conditions, and a second user interface output state may be captured by the set of values of a second set of conditions. For example, a first user interface output state may display an animated bird sleeping. The conditions for this first user interface output state may define whether the bird's eyes are open or closed, whether the bird is singing or snoring, and whether the bird is sitting on a perch or flying. The respective values for these conditions may be that the bird has its eyes closed, that the bird is snoring, and that the bird is sitting on a perch. A second user interface output state may be one in which the animated bird is singing, and the conditions for this second user interface output state may define whether the animated bird's eyes are open or closed, whether the animated bird is singing or snoring, and whether the animated bird is sitting on a perch or flying. The respective values for these conditions in the second user interface output state may be that the animated bird's eyes are open, that the animated bird is singing, and that the animated bird is sitting on a perch. Upon receiving an action indicating that the animated bird should be singing, the user interface output sequence may transition from the first user interface output state to the second user interface output state. In order to transition from the first user interface output state to the second user interface output state, the user interface output sequence may display the animated bird opening its eyes, singing instead of snoring, and sitting on a perch.
Typically, elements of user interface output have ordering requirements. For example, when a user interface output sequence displays an animated bird snoring, the snoring audio element should occur concurrently with the display of the animated bird asleep and with the motion of the animated bird's breathing. Additionally, when transitioning from displaying an animated bird sleeping to showing the animated bird flying, the snoring should be stopped before the animated bird starts to fly.
An application program may want to generate user interface output. In order to do so, the application program specifies a series of low-level commands. The low-level commands may be instructions of a particular computer programming language or instructions stored in a user interface output script. Each low-level command specifies a particular task for the user interface output sequence to perform. For example, one low-level command may be to have an animated bird flap its wings and another low-level command may be to have an animated bird open its eyes. In order to generate user interface output, the application program typically requires detailed knowledge about a first state of the user interface output, a second state that the user interface output should be in, and the low-level commands which should be invoked to transition from the first state to the second state.
For example, if an application program wants to display an animated bird flying, the application program first determines the current state of the user interface output. For this example, the animated bird is initially asleep, snoring, while sitting on a perch. The application program determines whether the animated bird is currently asleep. If the animated bird is asleep, the application program invokes low level commands to wake up the animated bird. For example, the low-level commands may include commands to open the bird's eyes and to stop the bird from snoring. Then the application program invokes low level commands to have the animated bird fly. In order to have the animated bird fly, the application program invokes low level commands such as making the animated bird's wings flap and making the animated bird rise off of the perch.
Because of the level of detail required to generate user interface output, developing an application program to generate user interface output is a time consuming process. Also, when an application program requires detailed knowledge to generate user interface output, if the user interface output is to be changed, complex changes to the application program are required. This is also time consuming and expensive.